//
//  ERBaseViewController.h
//  ExchangeRate
//
//  Created by 方义强 on 15/11/7.
//  Copyright © 2015年 方义强. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TWMessageBarManager.h"
#import "FMDatabase.h"

typedef void(^Reload)(void);

@interface ERBaseViewController : UIViewController<TWMessageBarStyleSheet>
{
@protected
    UIView *_topView;
    UIButton *_leftButton;
    UILabel *_titleLabel;
    UIButton *_rightButton;
    UIView *_lineView;
}
@property (nonatomic, strong) FMDatabase *dataBase; // 数据库
@property (nonatomic, strong) UIView *lineView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIView *topView;
@property (nonatomic, strong) UIButton *leftButton;
@property (nonatomic, strong) UIButton *rightButton;

@property (nonatomic, copy) Reload reload;
@property (nonatomic, strong) NSString *counSim;
@property (nonatomic, strong) NSArray *jsonDataArr;
@property (nonatomic, strong) NSMutableArray *dataCountryArr;
@property (nonatomic, strong) NSMutableArray *dataSimCounArr;  // 按照dataSectionArr中顺序的国家简写
@property (nonatomic, strong) NSMutableArray *dataCounNameArr; // 按照dataSectionArr中顺序的国家名称
@property (nonatomic, strong) NSMutableArray *dataSectionArr;  // 索引简写
@property (nonatomic, strong) NSMutableDictionary *allNameDic;
@property (nonatomic, strong) NSMutableDictionary *allSimDic;

- (id)initWithStyleSheet:(NSObject<TWMessageBarStyleSheet> *)stylesheet;
- (int) currentNetWork;
- (void) topAlertShowTitle:(NSString *)title andMessage:(NSString *)message andType:(TWMessageBarMessageType)type;
- (NSMutableArray *) changeEditStye:(NSMutableArray *)array andValue:(BOOL)value andSimpleName:(NSString *)simName;
- (void) openDataBase;
- (NSMutableArray *) getCommentShowSim;
@end
